import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import { Pages } from './pages'

// console.log(import.meta.env.BASE_URL);

const router = createRouter({
  history: createWebHashHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: Pages.home,
      component: () => import('@/views/Root.vue'),
      redirect: {name: Pages.discover},
      children: [
        {
          path: 'discover',
          name: 'discover',
          component: () => import('@/views/discover/Discover.vue'),
          meta: {
            menu: 'discover',
            keepAlive: true
          }
        }
      ]
    }
  ]
})


export default router